import asyncComponent from './lazy';
// 图标
import { 
  HomeOutlined, 
} from  '@ant-design/icons';
const Layout = () => import('@/components/Layout')
const Login = () => import('@/pages/Login')
const Home = () => import('@/pages/Home')
const Finance = () => import('@/pages/Finance')
const Order = () => import('@/pages/Order')
const Merchant = () => import('@/pages/Merchant')
const Users = () => import('@/pages/Users')
const Report = () => import('@/pages/Report')
const System = () => import('@/pages/System')
const Center = () => import('@/pages/Center')
const Trade = () => import('@/pages/Trade')
const Statistics = () => import('@/pages/Statistics')
const MerchantReport = () => import('@/pages/MerchantReport')
const Fund = () => import('@/pages/Fund')

export const routes = [
  {
    path: '/login',
    exact: true,
    title: '登录页',
    key: 'login',
    component: asyncComponent(Login),
  },
  {
    path: '/',
    menu: true,
    key: '/',
    component: asyncComponent(Layout),
    children: [
      {
        path: '/home',
        icon: HomeOutlined,
        title: '首页',
        key: '/home',
        id: '0',
        component: asyncComponent(Home),
      },
      {
        path: '/finance',
        icon: HomeOutlined,
        title: '财务管理',
        key: '/finance',
        id: '1',
        component: asyncComponent(Finance),
        children: [
          {
            path: '/finance/deposit',
            title: '存款管理',
            icon: HomeOutlined,
            key: '/finance/deposit',
            id: '10',
            component: asyncComponent(() => import('@/pages/Finance/Deposit')),
          },
          {
            path: '/finance/draw',
            title: '出款管理',
            icon: HomeOutlined,
            key: '/finance/draw',
            id: '11',
            component: asyncComponent(() => import('@/pages/Finance/Draw')),
          },
          {
            path: '/finance/memberDeposit',
            title: '会员存款管理',
            icon: HomeOutlined,
            key: '/finance/memberDeposit',
            id: '12',
            component: asyncComponent(() => import('@/pages/Finance/MemberDeposit')),
          },
        ]
      },
      {
        path: '/order',
        icon: HomeOutlined,
        title: '订单管理',
        key: '/order',
        id: '2',
        component: asyncComponent(Order),
        children: [
          {
            path: '/order/buy',
            title: '买入单',
            icon: HomeOutlined,
            key: '/order/buy',
            id: '14',
            component: asyncComponent(() => import('@/pages/Order/Buy')),
          },
          {
            path: '/order/sell',
            title: '卖出单',
            icon: HomeOutlined,
            key: '/order/sell',
            id: '13',
            component: asyncComponent(() => import('@/pages/Order/Sell')),
          },
          {
            path: '/order/arbitrate',
            title: '订单仲裁',
            icon: HomeOutlined,
            key: '/order/arbitrate',
            id: '15',
            component: asyncComponent(() => import('@/pages/Order/Arbitrate')),
          },
          {
            path: '/order/registration',
            title: '挂单管理',
            icon: HomeOutlined,
            key: '/order/registration',
            id: '16',
            component: asyncComponent(() => import('@/pages/Order/Registration')),
          },
          {
            path: '/order/query',
            title: '订单查询',
            icon: HomeOutlined,
            key: '/order/query',
            id: '17',
            component: asyncComponent(() => import('@/pages/Order/Query')),
          },
        ]
      },
      {
        path: '/merchant',
        icon: HomeOutlined,
        title: '商户管理',
        key: '/merchant',
        id: '3',
        component: asyncComponent(Merchant),
        children: [
          {
            path: '/merchant/addAccount',
            title: '商户开户',
            icon: HomeOutlined,
            key: '/merchant/addAccount',
            id: '18',
            component: asyncComponent(() => import('@/pages/Merchant/AddAccount')),
          },
          {
            path: '/merchant/manage',
            title: '商户管理',
            icon: HomeOutlined,
            key: '/merchant/manage',
            id: '23',
            component: asyncComponent(() => import('@/pages/Merchant/Manage')),
          },
          {
            path: '/merchant/log',
            title: '商户日志查询',
            icon: HomeOutlined,
            key: '/merchant/log',
            id: '19',
            component: asyncComponent(() => import('@/pages/Merchant/Log')),
          },
          {
            path: '/merchant/whiteList',
            title: '商户白名单管理',
            icon: HomeOutlined,
            key: '/merchant/whiteList',
            id: '20',
            component: asyncComponent(() => import('@/pages/Merchant/whiteList')),
          },
          {
            path: '/merchant/recharge',
            title: '商户充值',
            icon: HomeOutlined,
            key: '/merchant/recharge',
            id: '21',
            component: asyncComponent(() => import('@/pages/Merchant/Recharge')),
          },
          {
            path: '/merchant/order',
            title: '商户订单',
            icon: HomeOutlined,
            key: '/merchant/order',
            id: '22',
            component: asyncComponent(() => import('@/pages/Merchant/Order')),
            children: [
              {
                path: '/merchant/order/recharge',
                title: '充值订单',
                icon: HomeOutlined,
                id: '0',
                key: '/merchant/order/recharge',
                component: asyncComponent(() => import('@/pages/Merchant/Order/Recharge')),
              },
              {
                path: '/merchant/order/withdraw',
                title: '取款订单',
                icon: HomeOutlined,
                id: '0',
                key: '/merchant/order/withdraw',
                component: asyncComponent(() => import('@/pages/Merchant/Order/Withdraw')),
              },
            ]
          },
          
        ]
      },
      {
        path: '/user',
        icon: HomeOutlined,
        title: '会员管理',
        key: '/user',
        id: '4',
        component: asyncComponent(Users),
        children: [
          {
            path: '/user/memberlist',
            title: '会员管理',
            icon: HomeOutlined,
            key: '/user/memberlist',
            id: '24',
            component: asyncComponent(() => import('@/pages/Users/MemberList')),
          },
          {
            path: '/user/addmember',
            title: '会员开户',
            icon: HomeOutlined,
            key: '/user/addmember',
            id: '25',
            component: asyncComponent(() => import('@/pages/Users/Addmember')),
          },
        ]
      },
      {
        path: '/report',
        icon: HomeOutlined,
        title: '报表管理',
        key: '/report',
        id: '5',
        component: asyncComponent(Report),
        children: [
          {
            path: '/report/finance',
            title: '商户财务总报表',
            icon: HomeOutlined,
            key: '/report/finance',
            id: '26',
            component: asyncComponent(() => import('@/pages/Report/Finance')),
          },
          {
            path: '/report/trade',
            title: '会员买卖报表',
            icon: HomeOutlined,
            key: '/report/trade',
            id: '27',
            component: asyncComponent(() => import('@/pages/Report/Trade')),
          },
          {
            path: '/report/category',
            title: '分类报表',
            icon: HomeOutlined,
            key: '/report/category',
            id: '28',
            component: asyncComponent(() => import('@/pages/Report/Category')),
          },
          {
            path: '/report/memberSummary',
            title: '新会员概要统计',
            icon: HomeOutlined,
            key: '/report/memberSummary',
            id: '29',
            component: asyncComponent(() => import('@/pages/Report/MemberSummary')),
          },
          {
            path: '/report/merchantSummary',
            title: '新商户概要统计',
            icon: HomeOutlined,
            key: '/report/merchantSummary',
            id: '30',
            component: asyncComponent(() => import('@/pages/Report/MerchantSummary')),
          },
        ]
      },
      {
        path: '/system',
        title: '系统设置',
        icon: HomeOutlined,
        key: '/system',
        id: '6',
        component: asyncComponent(System),
        children: [
          {
            path: '/system/home',
            title: '系统设置',
            key: '/system/home',
            icon: HomeOutlined,
            id: '31',
            component: asyncComponent(() => import('@/pages/System/Home')),
          },
          {
            path: '/system/collectionSetting',
            title: '收款设置',
            key: '/system/collectionSetting',
            icon: HomeOutlined,
            id: '32',
            component: asyncComponent(() => import('@/pages/System/CollectionSetting')),
          },
          {
            path: '/system/channelSetting',
            title: '渠道设置',
            key: '/system/channelSetting',
            icon: HomeOutlined,
            id: '33',
            component: asyncComponent(() => import('@/pages/System/ChannelSetting')),
          },
          {
            path: '/system/merchantDWSetting',
            title: '商户存提设置',
            key: '/system/merchantDWSetting',
            icon: HomeOutlined,
            id: '34',
            component: asyncComponent(() => import('@/pages/System/MerchantDWSetting')),
          },
          {
            path: '/system/merchantCategory',
            title: '商户分类',
            key: '/system/merchantCategory',
            icon: HomeOutlined,
            id: '35',
            component: asyncComponent(() => import('@/pages/System/MerchantCategory')),
          },
          {
            path: '/system/role',
            title: '角色管理',
            key: '/system/role',
            icon: HomeOutlined,
            id: '999',
            component: asyncComponent(() => import('@/pages/System/Role')),
          },
          {
            path: '/system/whiteSetting',
            title: '白名单管理',
            key: '/system/whiteSetting',
            icon: HomeOutlined,
            id: '36',
            component: asyncComponent(() => import('@/pages/System/WhiteSetting')),
          },
          {
            path: '/system/blackSetting',
            title: '黑名单管理',
            key: '/system/blackSetting',
            icon: HomeOutlined,
            id: '37',
            component: asyncComponent(() => import('@/pages/System/BlackSetting')),
          },
          {
            path: '/system/creditRating',
            title: '信用等级',
            key: '/system/creditRating',
            icon: HomeOutlined,
            id: '38',
            component: asyncComponent(() => import('@/pages/System/CreditRating')),
          },
          {
            path: '/system/carouselSetting',
            title: '轮播图管理',
            key: '/system/carouselSetting',
            icon: HomeOutlined,
            id: '39',
            component: asyncComponent(() => import('@/pages/System/CarouselSetting')),
          },
          {
            path: '/system/noticeManage',
            title: '公告管理',
            key: '/system/noticeManage',
            icon: HomeOutlined,
            id: '0',
            component: asyncComponent(() => import('@/pages/System/NoticeManage')),
          },
          {
            path: '/system/bankCardManage',
            title: '银行卡管理',
            key: '/system/bankCardManage',
            icon: HomeOutlined,
            id: '0',
            component: asyncComponent(() => import('@/pages/System/BankCardManage')),
          },
        ]
      },
      {
        path: '/center',
        icon: HomeOutlined,
        title: '个人中心',
        key: '/center',
        id: '7',
        component: asyncComponent(Center),
        children: [
          {
            path: '/center/secondary',
            title: '二次验证',
            icon: HomeOutlined,
            key: '/center/secondary',
            id: '40',
            component: asyncComponent(() => import('@/pages/Center/Secondary')),
          },
          {
            path: '/center/log',
            title: '日志查询',
            icon: HomeOutlined,
            key: '/center/log',
            id: '41',
            component: asyncComponent(() => import('@/pages/Center/Log')),
          },
          {
            path: '/center/password',
            title: '密码管理',
            icon: HomeOutlined,
            key: '/center/password',
            id: '42',
            component: asyncComponent(() => import('@/pages/Center/Password')),
          },
        ]
      },
    ]
  },
];